import { uniFetch  } from '../utils/Ajax'
import {uniConfig} from '../config/index'
const appId = uniConfig.appId
const basePath = uniConfig.prodPath
//获取影院详细
export function getCinema(data : any) {
  return uniFetch.uniPost({
      query: {
          ...data
      }
      },
      basePath + "/cinema/get"
  )
}

//获取影院上映影片
export function getCinemaHotMovies(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/movie/hot/list"
    )
}

//获取影院指定影片的排期
export function getCinemaPlayDates(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/opi/dateList"
    )
}

//获取影院指定影片固定日期的场次
export function getCinemaPlayTimes(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/opi/list"
    )
}

//获取场次选座图
export function getSeats(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/opi/seat"
    )
}

//创建电影订单
export function createMovieOrder(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/member/order/create"
    )
}

//检验选择位置的合法性
export function validSeatPosition(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/opi/validSeatPosition"
    )
}

//获取电影订单
export function getMovieOrder(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
        }
        },
        basePath + "/member/order/get"
    )
}

//取消指定订单
export function cancelOrder(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/member/order/cancel"
    )
}

//获取订单可使用权
export function getCouponList(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/member/order/coupon/list"
    )
}

//获取电影订单列表
export function getMovieOrderList(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/member/movie/order/list"
    )
}

//获取电影订单详细
export function getMovieOrderDetail(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/member/movie/order/detail"
    )
}

//获取排期详情
export function getOpiDetail(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/opi/get"
    )
}

//获取电影详情
export function getMovieDetail(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/movie/get"
    )
}

//获取场次分享二维码
export function getOpiShareQrcode(data : any) {
    return uniFetch.uniPost({
        query: {
            ...data
            }
        },
        basePath + "/zt/wzry/opi/share"
    )
}
